<link rel="stylesheet" type="text/css" href="{{$url.common}}templates/css/tables.css" />
<div id="sub-main-container">
	<div id="sub-main-header">
		<div style="padding-left: 10px; padding-top: 7px; padding-bottom: 10px;">
			<h1 style="margin-left: 10px">[`Available folders`]</h1>
		</div>
	</div>
	<div id="sub-main-content">
		<table cellspacing=0 cellpadding=0 width="100%" class="wbs-html-grid">
		<thead>
		<tr>
			<td style="padding-left:18px">[`Folder name`]</td>
			<td align="center" width="10%">[`Rights`]</td>
			<td align="center" width="10%">[`Contacts`]</td>
		</tr>
		</thead>
		{{foreach from=$folders item=f}}{{counter assign=i}}
		<tr {{if $i % 2 == 0}}class="odd"{{/if}}>
			<td><a href="javascript:void(0)" onClick="openFolder('{{$f.ID}}')"  style="padding-left: {{$f.OFFSET*10+5}}px">{{$f.NAME}}</a></td>
			<td align="center">{{$right_names[$f.RIGHTS]}}</td>
			<td align="center">{{$f.COUNT}}</td>
		</tr>
		{{/foreach}}
		</table>
	</div>
	<div id="sub-main-footer">
		<div class="footer">{{$contacts_count}} [`contacts in`] {{$folders|@count}} [`available folders`]</div>
	</div>
</div>
<script type="text/javascript">
		var container = new WbsFlexContainer ({
			elem: $("sub-main-container"), 
			headerElem: $("sub-main-header"), 
			contentElem: $("sub-main-content"),
			footerElem: $("sub-main-footer")
		});
		container.resize();
</script>